<template>
    <div>
        <!-- 品牌精选 -->
        <div class="brand">
            <div class="brand-header">
                <router-link to="">
                    <span class="brand-left">全球品牌精选</span>
                    <span class="brand-right">查看更多</span>
                </router-link>
             </div>
            <div class="brand-con">
                <ul>
                    <li>
                        <span class="one-left"><router-link to=""><img src="../../assets/images/brand1.jpg" alt="" width="100%"></router-link></span>
                        <span class="one-right">
                            <i class="one-right1"><router-link to=""><img src="../../assets/images/brand2.jpg" alt="" width="100%"></router-link></i>
                            <i class=""><router-link to=""><img src="../../assets/images/brand3.jpg" alt="" width="100%"></router-link></i>
                        </span>
                    </li>
                    <li>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand4.png" alt="" width="100%"></router-link></i>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand5.png" alt="" width="100%"></router-link></i>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand6.png" alt="" width="100%"></router-link></i>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand7.png" alt="" width="100%"></router-link></i>
                    </li>
                    <li>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand8.png" alt="" width="100%"></router-link></i>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand9.png" alt="" width="100%"></router-link></i>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand10.png" alt="" width="100%"></router-link></i>
                            <i class="two25"><router-link to=""><img src="../../assets/images/brand10.png" alt="" width="100%"></router-link></i>
                    </li>
                </ul>
                  
            </div>   
                
                
           
        </div>
        <!-- 领券购买 -->
        <div class="buy">
            <div class="buy-header">领券立减&nbsp;多买多省</div>
            <router-link to="">
                <div class="buy-con">
                    <img src="../../assets/images/buy_bg.jpg" alt="">
                </div>
            </router-link>
        </div>
        <!-- 亚马逊畅销榜 -->
        <div class="amazon-hot">
            <div class="brand-header">
                <router-link to="">
                    <span class="brand-left">亚马逊畅销榜</span>
                    <span class="brand-right">更多品类</span>
                    <div class="brand-con">
                        <router-link></router-link>
                    </div>   
                </router-link>                
            </div>
            <div class="hot-con">
                <div class="con-header"><span>化妆水</span></div>
                <ul>
                    <li>
                       <router-link to="">
                           <div class="con-img">
                                   <img src="../../assets/images/hot1.jpg" alt="" width="300px">
                               <i class="order"><img src="../../assets/images/first.png" alt="" width="25px"></i>
                            </div>
                           <div class="con-txt">
                               <span class="con-describe">Rosense 洛神诗 玫瑰水 天然纯植物 1件装（1 x 300毫升）</span>
                               <span class="con-price">￥123.82</span>
                           </div>
                        </router-link> 
                    </li>
                    <li>
                       <router-link to="">
                           <div>
                            <div class="con-img">
                                    <img src="../../assets/images/hot2.jpg" alt="" width="300px">
                                <i class="order"><img src="../../assets/images/second.png" alt="" width="25px"></i>
                                </div>
                            <div class="con-txt">
                                <span class="con-describe">Rosense 洛神诗 玫瑰水 天然纯植物 1件装（1 x 300毫升）</span>
                                <span class="con-price">￥123.82</span>
                            </div>                               
                           </div>
                        </router-link> 
                    </li>
                     <li>
                       <router-link to="">
                                <div class="con-img">
                                        <img src="../../assets/images/hot3.jpg" alt="" width="300px">
                                    <i class="order"><img src="../../assets/images/third.png" alt="" width="25px"></i>
                                    </div>
                                <div class="con-txt">
                                    <span class="con-describe">Rosense 洛神诗 玫瑰水 天然纯植物 1件装（1 x 300毫升）</span>
                                    <span class="con-price">￥123.82</span>
                                </div>
                        </router-link> 
                    </li>
                </ul>
            </div>
        </div>
        <!-- 长滚动 -->
        <div class="longgun">
            <div class="longgun-img">
                <router-link to="">
                    <img src="../../assets/images/longgun1.jpg" alt="" width="415px">
                </router-link>
                
            </div>
            <div class="longgun-con">
                <ul>
                    <li>
                        <router-link to="">
                            <span><img src="../../assets/images/gun1.jpg" alt="" width="50px"></span>
                            <span>能量棒68元起</span>
                            <span><i><img src="../../assets/images/gun2.jpg" alt="" width="40px"></i><i><img src="../../assets/images/gun3.jpg" alt="" width="40px"></i></span>
                        </router-link>
                        
                    </li>
                    <li>
                        <router-link to="">
                            <span><img src="../../assets/images/gun4.jpg" alt="" width="50px"></span>
                            <span>代餐59元起</span>
                            <span><i><img src="../../assets/images/gun5.jpg" alt="" width="40px"></i><i><img src="../../assets/images/gun6.jpg" alt="" width="40px"></i></span>
                        </router-link>                        
                    </li>
                    <li >
                        <router-link to="">
                            <span><img src="../../assets/images/gun1.jpg" alt="" width="50px"></span>
                            <span>能量棒68元起</span>
                            <span><i><img src="../../assets/images/gun2.jpg" alt="" width="40px"></i><i><img src="../../assets/images/gun3.jpg" alt="" width="40px"></i></span>
                        </router-link>                       
                    </li>
                    <li>
                        <router-link to="">
                            <span><img src="../../assets/images/gun1.jpg" alt="" width="50px"></span>
                            <span>能量棒68元起</span>
                            <span><i><img src="../../assets/images/gun2.jpg" alt="" width="40px"></i><i><img src="../../assets/images/gun3.jpg" alt="" width="40px"></i></span>
                        </router-link>                        
                    </li>
                    <li>
                        <router-link to="">
                            <span><img src="../../assets/images/gun1.jpg" alt="" width="50px"></span>
                            <span>能量棒68元起</span>
                            <span><i><img src="../../assets/images/gun2.jpg" alt="" width="40px"></i><i><img src="../../assets/images/gun3.jpg" alt="" width="40px"></i></span>
                        </router-link>                        
                    </li>
                    <li class="more">
                        <span>查看更多</span>
                        <span><img src="../../assets/images/see_more_icon.png" alt="" height="22px"></span>
                    </li>
                </ul>
            </div>
        </div>
        <!-- 特别推荐 -->
        <div class="recomm">
            <div class="recomm-header">
                特别推荐
            </div>
            <div class="recomm-con">
                <ul>
                    <li v-for="(item,index) in list">
                        <router-link to="">
                            <div class="recomm-img"><img :src="item.url" alt=""></div>
                            <div class="recomm-txt">
                                <span class="re-describe">{{item.describe}}</span>
                                <span><i class="re-price">{{item.price}}</i>
                                <i class="re-start" :style="'background-position:'+item.position"></i>
                                <i class="num">{{item.num}}</i></span>
                            </div>
                        </router-link>
                    </li>
                    <!-- <li></li>
                    <li></li> -->
                </ul>
            </div>
        </div>
       <!-- 重要安全提醒 -->
        <div class="remind">
            <router-link to=""><img src="../../assets/images/remind.png" alt="" width="100%"></router-link>
        </div>     
    </div>
</template>
<style lang="" scoped>
*{
    margin: 0px;
    padding: 0px;
    list-style: none;
    box-sizing: border-box;
}
/* -----------------品牌------------------------------------- */
.brand{
    min-height: 380px;
}
.brand a{
    color: #111;
}
.brand-header{
   height: 45px; 
   overflow: hidden;
   line-height: 45px;
   padding: 0px 20px;
}
.brand-left{
    float: left;
    font-size: 18px;
    color: gray;
}
.brand-right{
    float: right;
    color:#0066c0 ;
}
.brand-con{
    min-height: 335px;
}
.brand-con li{ 
    display: flex;
    width: 100%;
}
.brand-con li .one-left{
    width: 50%;
}
.brand-con li .one-right{
    width: 50%;
}
.brand-con li:nth-of-type(2){
    height: 61px;
    padding: 0px 20px;
    line-height: 61px;
}
.brand-con li:nth-of-type(3){
    height: 61px;
    padding: 0px 20px;
    line-height: 61px;
}
.brand-con li .two25{
    width: 23%;
    margin-right: 2%;
    
}
/* ----------领券购买---------------------- */
.buy{
    height: 450px;
    background: white;
     padding: 0px 20px;
}
.buy-header{
    height: 45px; 
    font-size: 20px;
    color: gray;
    line-height: 45px;
}
.buy img{
    width: 380px;  
}
/* ------------------亚马逊畅销榜-------------------- */
.hot-con{
    background: #fff5e8 ;
}
.hot-con ul{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.hot-con ul li{
    width: 33%;
    height: 390px;
    width: 414px;
    background: white;
    /* border: 1px solid purple; */
    padding-top: 10px;
}
.hot-con ul li:nth-of-type(1){
    width: 370px;
}
/* 样式 */
.con-price{
    color: #b12704 ;
    margin-top:20px;
    display: block;
}
.con-img{
    position: relative;
     background: white;
     width: 370px;
     padding: 0px 30px;
}

.con-img .order{
    position: absolute;
    top: 0px;
    left: 0px;
}
.hot-con .con-header{
    text-align: left;
    height: 20px;
    padding: 5px 0px;
}
.hot-con .con-txt{
    text-align: center;
    color: gray;
    font-size: 14px;
    background: white;
}
/* ------------------------长滚动条----------------------- */
.longgun{
    height: 300px;
    background: white;
    border-top: 5px solid  #cccccc;;
    border-bottom:5px solid  #cccccc;
}
.longgun-con{
    padding-top: 20px;;
    overflow-x: auto;
    overflow-y: hidden;
}
.longgun-con::-webkit-scrollbar{
    display: none;
}
.longgun-con ul{
    width: 700px;
    display: flex;
  
}
.longgun-con ul li{
    width: 100px;
    height: 110px;
    background: #f3f3f3;
    text-align: center;
    margin-left:10px;
}
.longgun-con ul .more{
    padding-top: 30px;
}
.longgun-con  a{
    color: gray;
}
.longgun-con  span{
    font-size: 12px;
    display: block;
    margin-top: 5px;
}
/* ------------------------特别推荐--------------------------------------------- */
.recomm{
    min-height: 200px;
    background: white;
}
.recomm-header{
    height: 40px; 
    
    line-height: 40px;
    font-weight: bold;
    font-size: 18px;
}
.recomm ul{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.recomm ul li{
   width: 50%;
   border: 1px solid #f3f3f3;
   height: 302px;
}
.recomm-img img{
    width: 176px;
    margin: 20px 20px;
}
.recomm-txt{
    height: 80px;
    position: relative;
}
.recomm-txt span{
    color: gray;
}
.re-price{
    margin-top: 12px;
    display: block;
    color: red;
}
.recomm-txt .re-start{
    background:url('../../assets/images/bg.png');
    position:absolute;
    width: 185px;
    height: 35px;
    /* top: 0px; */
    left: -45px;
    bottom: 2px;
    transform: scale(0.5);
}
.num{
    margin-left: 100px;
    font-size: 12px;
    background-color: transparent;
}
/* ----------------------安全提示----------------------------------- */
.remind{
    border-top: 5px solid  #cccccc;
}
</style>
<script>
export default{
    name: "carrousel",
    data(){
        return{
            list:[]
    };
},

    mounted(){
    var _this=this;
    this.$http.get('./data/recommend.json') 
        .then((response)=> {
        console.log(response);
        this.list=response.data.list;
         console.log(this.list);
         console.log(this.item.position)
    })
 
    .catch(function (error) {
        console.log(error);
    })
    .then(function () {
        // always executed
    }) 

    } 
}

</script>
